﻿<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html>
<head>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> 

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="apple-itunes-app" content="app-id=591578609">
<meta name="viewport" content="width=device-width"/>
<meta name="description" content="筑学堂网校" />
<meta name="keywords" content="筑学堂网校、建筑、考试"/>

<link rel="stylesheet" type="text/css" href="../../style/share/style.css">
<link rel="stylesheet" type="text/css" href="../../style/share/kczx.css">
<link rel="stylesheet" type="text/css" href="../../style/share/home_style.css">
<link rel="stylesheet" type="text/css" href="../../style/user.css">

	
<!--[if IE 7]>
<link rel="stylesheet" href="/css/font-awesome/css/font-awesome-ie7.min.css">
<![endif]-->

<script type="text/javascript" src="../../js/home.js"></script>

<script type="text/javascript">

	//取消
	function cancelAdd(){
		   $.ajax({ url: "../query_group_activity/${group_id}/1/null", 
		       success: function(result){
	           $("#mainPageDiv").html(result);
	        }
	       });
	}
	
	//保存添加
	function addActivity(){
		   
		   var activity_nm =$("#activity_nm").val();
		   var start_dt = $("#start_dt").val();
		   var end_dt = $("#end_dt").val();
		   var activity_txt = $("#activity_txt").val();
		   
		  /*  $.ajax({url: "../query_homeGroup_activity_add/${group_id}/"+activity_nm+"/"+start_dt+"/"+activity_txt+"/"+end_dt, 
		       success: function(result){
	           alert(result);
	           
	           if('success'==result){
	        	   $.ajax({ url: "../query_group_activity/${group_id}", 
	    		       success: function(result){
	    	           $("#mainPageDiv").html(result);
	    	        }
	    	       });
	           }
	        }
		   }); */
		   
		   var url = "../query_homeGroup_activity_add";
		   
		   $.ajax({ url:url , 
   		    type:"post",
   		    data:{
   		    	group_id:'${group_id}',
   		    	activity_nm:activity_nm,
   		    	start_dt:start_dt,
   		    	activity_txt:activity_txt,
   		    	end_dt:end_dt
   		    	
   		    },
		    success: function(result){
		    	   alert(result);
		           
		           if('success'==result){
		        	   $.ajax({ url: "../query_group_activity/${group_id}/1/null", 
		    		       success: function(result){
		    	           $("#mainPageDiv").html(result);
		    	        }
		    	       });
		           }
		    	   
	         }
	     });
   }

</script>
<title>筑学堂家园个人空间</title>
<style type="text/css">
a {
	color:#222;
}
a:hover {
	color:#888;
}
li {
	list-style-type:none;
	border:none;
}
</style>
</head>
<body style="align:center; padding:0;margin:0;clear:both; background-color:FFF;">
	<div class="home_group">
			<div class="home_groupnotice" style="min-height:60px;">
				<div class="home_grnottit" style="margin-top:20px;margin-bottom:20px;"> 添加活动</div>
				<div class="home_groupnot" style="padding-top:20px;padding-left:10px;"> 
				<span style="font-weight:bold">活动名称：</span>
				<input style="width:500px;height:25px;padding:0;margin:0;" type="text"  id="activity_nm"/>
				<br/>
				<br/>
				
				<span style="font-weight:bold">活动时间：</span>
				  <input class="Wdate" type="text" onClick="WdatePicker({dateFmt:'yyyy-MM-dd H:mm:ss'})" id="start_dt" style="width:200px;height:25px;margin:0;padding:0;"/> 
				  &nbsp;&nbsp; ~~
				  <input class="Wdate" type="text" onClick="WdatePicker({dateFmt:'yyyy-MM-dd H:mm:ss'})" id="end_dt" style="width:200px;height:25px;margin:0;padding:0;"/>
				<br/>
				<br/>
				<span style="font-weight:bold;vertical-align:top;">活动详情：</span>
				<textarea style="width:500px;height:150px;"   id="activity_txt">  </textarea>
				</div>
				
				<div class="blogadd_title01" style="width:98%;margin-top:40px;">
			<a href="#" onclick="addActivity()">
			  <div class="blogadd_textadd" style="position:relative;float:left;left:35%;background-color:#209E85;"> 发布活动 </div>
			</a>
			
			 <div style="position:relative;float:left;left:35%;margin-left:10px;">
			    <a href="#" onclick="cancelAdd()"> 取消</a>
			 </div>
		</div>
				
			</div>
		</div>
</body>
</html>